In recent years, contact holes with various depths have been often formed in a case of manufacturing a three-dimensional semiconductor memory or the like. In such a case, the number of steps for forming these contact holes become large, which causes a problem that increases costs and loads for manufacturing the three-dimensional semiconductor memory.